package com.itcam.config;

import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

/**
 * Author:Cammy.Wu
 * Date:2024-05-06
 * Description:spring的初始化类
 */

public class SpringIoCInit extends AbstractAnnotationConfigDispatcherServletInitializer {
    // rootioc容器的配置类
    @Override
    protected Class<?>[] getRootConfigClasses() {
        return new Class[]{ServiceJavaConfig.class, DataSourceJavaConfig.class, NewMapperJavaConfig.class};
    }

    // webioc容器的配置类
    @Override
    protected Class<?>[] getServletConfigClasses() {
        return new Class[]{WebMvcJavaConfig.class};
    }

    // disapatcherServlet的拦截路径
    @Override
    protected String[] getServletMappings() {
        return new String[]{"/"};
    }
}
